/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package datas;

import java.sql.Connection;
import java.sql.DriverManager;

/**
 *
 * @author Administrator
 */
public class connect {

    private Connection con;
    private String url;

    public connect() {
        loadDriver();
        setConnect();
    }

    public void loadDriver() {
        try {
            Class.forName("com.mysql.jdbc.Driver");
        } catch (Exception ex) {
            ex.getMessage();
        }
    }

    public void setConnect() {
        try {
            con = DriverManager.getConnection("jdbc:mysql://localhost;Database=ccbd;user=chaucute;password=diemzicker");
        } catch (Exception ex) {
            ex.getMessage();
        }
    }
    
    public Connection getConnect(){
        return con;
    }
}
